#!/usr/bin/env python
# -*- encoding: UTF-8 -*-
from __future__ import print_function

from flask import render_template,url_for
from . import main
from . import camManger

@main.route('/show', methods=['GET', 'POST'])
def show():
    urls = [
        {"url": url_for('.show_camera') , "text": u"显示所有相机信息"}
    ]
    return render_template('index.html',name=u"显示",urls=urls)

@main.route('/show/camera', methods=['GET', 'POST'])
def show_camera():
    cams = camManger.get_all()
    return render_template('show_camera.html',name=u"显示所有相机信息",cams=cams)